home *** CD-ROM | disk | FTP | other *** search
- //combine color and texture sample, and clip if alpha from texture isn't near max
- //Luke Lenhart
- //(C)2004-2005 Digipen Institute of Technology
-
- //texture sampler
- sampler2D sampTex;
-
- //shader input
- struct PS_INPUT
- {
- float4 Color : COLOR;
- float2 Tex0 : TEXCOORD0;
- };
-
- //shader code
- float4 PShader(PS_INPUT In) : COLOR
- {
- //sample textutes
- float4 texclr=tex2D(sampTex,In.Tex0);
-
- //texkill if alpha from texture isn't near full
- clip(texclr.a-0.5f);
-
- //blend with vert color
- float4 clr=texclr*In.Color;
-
- //spit out color
- return clr;
- }
-